package ru.timofeyco.timofeypersonal.web;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
public class MainController {
    @RequestMapping(value = "/", method = RequestMethod.GET)
    public String main() {
        return "/index";
    }

    @RequestMapping(value = "/demo/{name}", method = RequestMethod.GET)
    public String demo(@PathVariable String name) {
        return "/demo/" + name;
    }
}
